//
//  NSObject+Notification.m
//  OralRobot
//
//  Created by 王桂敏 on 16/5/6.
//  Copyright © 2016年 wangguimin. All rights reserved.
//

#import "NSObject+Notification.h"

@implementation NSObject (Notification)


- (void)addObserver:(nullable id)observer selector:(nullable SEL)aSelector name:(nullable NSString *)aName object:(nullable id)anObject{
    
    [[NSNotificationCenter defaultCenter] addObserver:observer selector:aSelector name:aName object:anObject];
}


- (void)postNotificationName:(nullable NSString *)aName object:(nullable id)anObject{
    
    [[NSNotificationCenter defaultCenter] postNotificationName:aName object:anObject];
}


- (void)postNotificationName:(nullable NSString *)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo{
    
    [[NSNotificationCenter defaultCenter] postNotificationName:aName object:anObject userInfo:aUserInfo];
}

- (void)removeObserver:(nullable id)observer{
    
    [[NSNotificationCenter defaultCenter] removeObserver:observer];
}
- (void)removeObserver:(nullable id)observer name:(nullable NSString *)aName object:(nullable id)anObject{
    
    [[NSNotificationCenter defaultCenter] removeObserver:observer name:aName object:anObject];
}



@end
